/**
*┌──────────────────────────────────────────────────────────────┐
*│　描    述：SysPermission仓储接口                                                   
*│　作    者：sys                                              
*│　创建时间：2020-11-06 14:41:01  
*│　说    明：代码生成器生成   
*└──────────────────────────────────────────────────────────────┘
*/
using SXFramWork.Core;
using SXFramWork.Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace SXFramWork.Repository
{
    public interface ISysPermissionRepository : IRepository<SysPermissionEntity>
    {
        /// <summary>
        /// 查询用户的菜单
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        Task<List<SysPermissionEntity>> GetMenuAsync(string userId);
        /// <summary>
        /// 查询所有菜单
        /// </summary>
        /// <returns></returns>
        Task<List<SysPermissionEntity>> GetAllMenus();
        /// <summary>
        /// 查询账户拥有的权限code
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="platform"></param>
        /// <returns></returns>
        Task<List<string>> QueryCodeByUserId(string userId);
        Task<List<SysPermissionEntity>> Query(MenuQueryModel model);
        Task<List<SysPermissionEntity>> QueryChildren(string id);
        Task<List<PermissionTreeModel>> GetAllPermission();

        Task<List<string>> GetPermissionByUId(string uid);
        Task<List<string>> GetPermission();
    }
}